Release 10.1A: OpenEdge Development:
Progress 4GL Reference


NEXT statement

Goes directly to the END of an iterating block and starts the next iteration of the block.

Syntax

NEXT [ label ] 

label

The name of the block for which you want to start the next iteration. If you do not name a block, Progress starts the next iteration of the innermost iterating block that contains the NEXT statement.

Example

The FOR EACH block in this procedure reads a single customer record on each iteration of the block. If the sales-rep field of a customer record does not match the sales-rep value supplied to the PROMPT-FOR statement, the NEXT statement causes Progress to do the next iteration of the FOR EACH block, bypassing the DISPLAY statement.

r-next.p
PROMPT-FOR customer.sales-rep LABEL "Enter salesman initials"
    WITH SIDE-LABELS CENTERED.
FOR EACH customer:
    IF sales-rep <> INPUT sales-rep
    THEN NEXT.
    DISPLAY cust-num name city state WITH CENTERED USE-TEXT.
END. 

See also

LEAVE statement


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095